FROM php:8.3-fpm-alpine

# Use the default production configuration
# RUN mv "$PHP_INI_DIR/php.ini-production" "$PHP_INI_DIR/php.ini"

WORKDIR /www



# Install PHP extensions
RUN docker-php-ext-install pdo_mysql
# pecl 安装扩展
RUN apk add --no-cache \
    $PHPIZE_DEPS \
    iputils 

RUN pecl install redis

# 开启扩展
RUN docker-php-ext-enable pdo_mysql redis

# Install Composer
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
